﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddClassRoom.aspx.cs" Inherits="SchoolManagement_CreateRoom"
    Title="Untitled Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../Css/ys.css" rel="stylesheet" type="text/css" />

    <script language="javascript" src="../My97DatePicker/WdatePicker.js"></script>

    <script src="../Js/jquery-1.4.2.min.js" type="text/javascript"></script>

    <script src="../Js/Core.js" type="text/javascript"></script>

    <script src="../Js/Main.js" type="text/javascript"></script>

    <script language="javascript">
        function onlyNum(value) {
            if (isNaN(value))
            { alert("对不起，请输入数字端口号！"); }
            $("#txtSvrPort").focus();

        }

        function ChkSVRPort() {
            var svrport = $("[DataField='SvrPort']").val();
            var svrId = $("[DataField='SVRList']").val();
            if (svrport == "") {
                alert("对不起，请输入SVR端口号！");
                return false;
            }
            VideoNetSchoolCore.Form.PostData(
                InitPostUrl,
                { OpType: "CheckSVR", PostData: svrport, strValue: svrId },
                function(e) {
                    if (e != "") {
                        alert(e);
                        return false;
                    }  

                }
            );
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="hidId" runat="server" />
    <div class="zt mainCenter">
        <div class="contentBody">
            <div class="title">
                教室管理-->新添教室</div>
            <br class="sp3px" />
            <table style="width: 100%; color: #336699;" class="ta1">
                <tr>
                    <td class="ta2 tag">
                        所属学校：
                    </td>
                    <td class="ta2">
                        <asp:DropDownList ID="dlSchool" runat="server" DataTextField="VS_name" Width="150px"
                            DataValueField="ID" CssClass="inp2">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        摄像头状态 ：
                    </td>
                    <td class="ta2">
                        <asp:DropDownList ID="ddlCameraStatus" runat="server" CssClass="inp2" Width="150px">
                            <asp:ListItem Value="1">可用</asp:ListItem>
                            <asp:ListItem Value="0">禁用</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        教室名称 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVR_roomName" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Text="*"
                            ControlToValidate="txtVR_roomName" ErrorMessage="教室名称不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        教室编号 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVR_roomCode" runat="server" CssClass="inp1" OnTextChanged="txtVR_roomCode_TextChanged"
                            AutoPostBack="true"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Text="*"
                            ControlToValidate="txtVR_roomCode" ErrorMessage="教室编号不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        摄像头名称 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtIPCName" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Text="*"
                            ControlToValidate="txtIPCName" ErrorMessage="摄像头名称不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        摄像头编号 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVR_cameraCode" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Text="*"
                            ControlToValidate="txtVR_cameraCode" ErrorMessage="摄像头编号不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        摄像头分辨率 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtVR_cameraImgSize" runat="server" CssClass="inp1"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" Text="*"
                            ControlToValidate="txtVR_cameraImgSize" ErrorMessage="摄像头分辨率不能为空" ValidationGroup="register"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        摄像头IP ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtIPCIp" runat="server" CssClass="inp1"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        摄像头端口号 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtIPCPort" runat="server" CssClass="inp1"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag" style="height: 25px">
                        摄像头用户名 ：
                    </td>
                    <td class="ta2" style="height: 25px">
                        <asp:TextBox ID="txtIPCUser" runat="server" CssClass="inp1"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        摄像头密码 ：
                    </td>
                    <td class="ta2">
                        <asp:TextBox ID="txtIPCPwd" runat="server" CssClass="inp1" TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        所属SVR端口 ：
                    </td>
                    <td class="ta2">
                        <input type="text" id="txtSvrPort" runat="server" onchange="onlyNum(this.value);"
                            class="inp1" datafield="SvrPort" />
                    </td>
                </tr>
                <tr>
                    <td class="ta2 tag">
                        所属SVR ：
                    </td>
                    <td class="ta2">
                        <asp:DropDownList ID="ddlSVRList" runat="server" CssClass="inp2" Width="150px" DataField="SVRList">
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
            <%--<input  type="button" id="btnAdd" validationgroup="register" onclick="return ChkSVRPort();" value="添加" class="button" />--%>
             <asp:Button ID="btnAdd" runat="server" Text="添加" OnClick="btnAdd_Click" CssClass="button"
                ValidationGroup="register" ></asp:Button>
                
                &nbsp;&nbsp;
                <input
                    type="button" onclick="this.form.reset(); " value="重置" class="button" id="btnReset"
                    runat="server" />
            <p>
                <span id="AuthSpan" style="color: Red; font-size: small"></span>
            </p>
        </div>
    </div>
    <div style="color: Red; clear: both">
        <asp:Label ID="lblMess" runat="server" Text=""> </asp:Label>
        <asp:ValidationSummary ID="validSummary" runat="server" HeaderText="错误信息" ValidationGroup="register" />
    </div>
    </form>
</body>
</html>
